package com.room.room.service.impl;

import com.project.utils.Query;
import com.room.room.entity.HouseModeEntity;
import com.room.room.entity.HousePayEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.utils.PageUtils;


import com.room.room.dao.HouseNewsDao;
import com.room.room.entity.HouseNewsEntity;
import com.room.room.service.HouseNewsService;


@Service("houseNewsService")
public class HouseNewsServiceImpl extends ServiceImpl<HouseNewsDao, HouseNewsEntity> implements HouseNewsService {
    @Autowired
    private HouseNewsDao houseNewsDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HouseNewsEntity> page = this.page(
                new Query<HouseNewsEntity>().getPage(params),
                new QueryWrapper<HouseNewsEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<HousePayEntity> payXl() {
        return houseNewsDao.payXl();
    }

    @Override
    public List<HouseModeEntity> RoomXl() {
        return houseNewsDao.roomXl();
    }

}